-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rating): line-wrapping comments for grade_cap_reasons #2568
Conversation
Thanks a lot, @magnuslarsen . Not sure whether we should just take my comment into the description but it's definitely a good idea to explain the grade cap better. I'll amend that today or tomorrow. |
Feel free to change whatever :-) At least it wraps nicely on very long reasons |
Hmm, I am unsure why the CI/CD fails to output any grade reasons; running it on my laptop (also Ubuntu 22.04) towards a known good host results in:
|
https://github.com/drwetter/testssl.sh/actions/runs/10917441970/job/30300762060 I am running it again.. |
bear with me |
No rush - this is a minor fix |
The problem is that the HTML output doesn't contain the grade cap reason, and I am scratching my head why. Here are the relevant outputs again (see above) from HTML and screen which are used in
|
Just to make sure: The problem is not the check, it is the code change which seems to swallow the grade cap reasons in HTML. 🧐 |
Aah good catch! Looking at That is: if [[ $reason_nr -eq 0 ]]; then
pr_bold " Grade cap reasons "
out_row_aligned_max_width "$reason\n" ' ' $TERM_WIDTH
html_out "$(html_reserved "$reason")"
else
out_row_aligned_max_width " $reason\n" ' ' $TERM_WIDTH
html_out "$(html_reserved "$reason")"
fi I'm not sure it's prettier to put it all on the same, already long line? |
I was just wondering why that problem didn't show up before. At the moment I am not sure yet what the best solution is . The fastest would be to leave that on one line but it's kind of ugly. For a more sustainable fix I'd like to understand whether we have a bug which has not been discovered yet by the unit test -- i.e. another long line not showing up in HTML output. |
It works if one uses Thanks! |
Thanks Dirk :-) |
Describe your changes
Fixes #2567
The grade_cap_reasons are now line-wrapped depending on terminal width
I've additional presumed you wanted the startTLS comment as a the grade-cap reason, and added it. It looks like this (with a narrow terminal):
And for non-startTLS but still broken (on a wide terminal):
What is your pull request about?
If it's a code change please check the boxes which are applicable
help()